package com.yuelao.controller.hello;

import com.yuelao.service.AopService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Description
 *
 * @author fengliye
 * @version v1.0
 * @date 29/11/2018 15:42
 * @modify detail
 * 版本       修改人        修改时间      修改内容描述
 * ---------------------------------------------
 * <p>
 * ---------------------------------------------
 */
@Slf4j
@Controller
@RequestMapping(value = "yuelao/{version}")
public class HelloController {
    @Autowired
    private AopService aopService;
    @ResponseBody
    @RequestMapping("hello")
    public String hello() {
        return "hello fengliye";
    }

    @ResponseBody
    @RequestMapping("aop")
    public String aop() {
        aopService.testLock("aopLock running");
        return "hello fengliye";
    }
}
